#{extends 'main.html' /}
#{set title:'MyNewEv' /}

<div id='cssmenu'>
<ul>
   <li><a href='/home'><span>Home</span></a></li>
   <li><a href='/category'><span>Create event</span></a></li>
   <li><a href='/myevents'><span>My events</span></a></li>
   <li><a href='/registeredevents'><span>Registered events</span></a></li>
</ul>
</div>
		<br/>
		<center>
		<nav-header>
			<a href="/trips"> Trips </a>
			<a href="/sports"> Sport </a>
			<a href="/culture"> Culture </a>
			<a href="/entertainment"> Entertainment </a>
			<a href="/night_life"> Night life </a>
			<a href="/learning"> Learning </a>
		</nav-header>
		</center>
		<div class="container">
			<!--<div id="adds">adds
			</div>-->


<div class="detailedevent" >
	<div class=${event.subCategoryString} >
		<h4> ${event.title} </h4>
		<p class="eventcontent">
			Author: ${event.author.userName} <br/>
			Category: ${event.category} <br/>
			SubCategory: ${event.subCategory} <br/>
			Date: ${(event.eventDate).format('dd MMMM yyyy')} <br/>
			Location: ${event.location} <br/>
			Description: ${event.description} <br/>
		</p>
	</div>
</div>	

<span class="event-comments">
	&nbsp;|&nbsp; 
 	${event.comments.size() ?: 'no'} 
	comment${event.comments.size().pluralize()}
    #{list items:event.comments, as:'comment'}
    	<p>
    		author: ${comment.author.userName} <br/>
    		content: ${comment.content}
    		actione:<a href='@{EventManager.deleteComment(comment.id,event.id)}'>delete</a>
    	</p>
    #{/list}
</span>

</div>
